package com.ruoyi.center.demo.api;

import com.ruoyi.center.demo.api.dto.DemoDto;
import com.ruoyi.common.core.dto.CommonResultDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * Demo示例接口
 *
 * @author ruoyi
 * @date 2022-02-15 10:59:29
 */
@Api(value = "Demo Api接口")
public interface DemoApi {

    /**
     * 新增
     *
     * @param demoDto
     * @return
     */
    @PostMapping("/create")
    @ApiOperation(value = "新增", notes = "新增")
    CommonResultDto<Long> create(@RequestBody DemoDto demoDto);

    /**
     * 修改
     *
     * @param demoDto
     * @return
     */
    @PutMapping("/modify")
    @ApiOperation(value = "修改", notes = "修改")
    CommonResultDto<Boolean> modify(@RequestBody DemoDto demoDto);

    /**
     * 删除
     *
     * @param ids
     * @return
     */
    @DeleteMapping("/remove/{ids}")
    @ApiOperation(value = "删除", notes = "删除")
    CommonResultDto<Boolean> remove(@PathVariable Long [] ids);
}
